home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
bipl.zip
/
PROGS.ZIP
/
LONGEST.ICN
< prev
next >
Wrap
Text File
|
1992-09-28
|
695b
|
26 lines
############################################################################
#
# File: longest.icn
#
# Subject: Program to write length of longest line in a file
#
# Author: Ralph E. Griswold
#
# Date: February 22, 1992
#
###########################################################################
#
# This little programs just writes the length of the longest line in
# standard input. Hardly worth the trouble, but it's been handy.
#
############################################################################
procedure main()
local line, max, save
max := 0
while line := read() do
if max <:= *line then save := line
write(save)
end